feat: refresh token

This commit is contained in:
naiba
2024-11-05 00:02:43 +08:00
parent b1a0b607da
commit bfdae2838f
5 changed files with 35 additions and 20 deletions

View File

@@ -66,7 +66,7 @@ export default () => {
<FormItem>
<FormLabel>Password</FormLabel>
<FormControl>
<Input placeholder="shadcn" {...field} />
<Input type="password" placeholder="shadcn" {...field} />
</FormControl>
<FormDescription>
This is your public display name.
@@ -75,7 +75,7 @@ export default () => {
</FormItem>
)}
/>
<Button type="submit">Submit</Button>
<Button type="submit">Login</Button>
</form>
</Form>
</div>

View File

@@ -7,7 +7,7 @@ export const ProtectedRoute = ({ children }: {
const { profile } = useAuth();
if (!profile && window.location.pathname !== "/dashboard/login") {
return <Navigate to="/dashboard/login" />;
return <><Navigate to="/dashboard/login" />{children}</>;
}
return children;