feat:对返回上一页做了处理
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React, { useState } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { smartGoBack } from '../../utils/navigation';
|
||||
import { ArrowLeft, Check } from 'lucide-react';
|
||||
|
||||
interface ScenarioOption {
|
||||
@@ -87,7 +88,7 @@ export default function NewPlan() {
|
||||
<header className="sticky top-0 z-10 bg-white border-b">
|
||||
<div className="flex items-center p-4">
|
||||
<button
|
||||
onClick={() => navigate(-1)}
|
||||
onClick={() => smartGoBack(navigate)}
|
||||
className="mr-3 p-1 hover:bg-gray-100 rounded"
|
||||
>
|
||||
<ArrowLeft className="h-5 w-5" />
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import React, { useEffect, useState } from 'react';
|
||||
import { useParams, useNavigate } from 'react-router-dom';
|
||||
import { smartGoBack } from '../../utils/navigation';
|
||||
import { ArrowLeft, Plus, Users, TrendingUp, Calendar } from 'lucide-react';
|
||||
|
||||
interface Plan {
|
||||
@@ -170,7 +171,7 @@ export default function ScenarioDetail() {
|
||||
<div className="flex items-center justify-between p-4">
|
||||
<div className="flex items-center">
|
||||
<button
|
||||
onClick={() => navigate(-1)}
|
||||
onClick={() => smartGoBack(navigate)}
|
||||
className="mr-3 p-1 hover:bg-gray-100 rounded"
|
||||
>
|
||||
<ArrowLeft className="h-5 w-5" />
|
||||
|
||||
Reference in New Issue
Block a user