mirror of
https://github.com/SrIzan10/echospace.git
synced 2026-06-06 00:56:54 +00:00
feat: add close notice on github integration
This commit is contained in:
@@ -14,7 +14,7 @@ export async function GET(request: Request): Promise<Response> {
|
||||
return new Response(null, {
|
||||
status: 302,
|
||||
headers: {
|
||||
Location: '/',
|
||||
Location: '/?close',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
// https://v0.dev/r/DxCSk58T8pM
|
||||
import CloseTabNotice from '@/components/app/CloseTabNotice/CloseTabNotice';
|
||||
import LandingStepper from '@/components/app/LandingStepper/LandingStepper';
|
||||
import Video from '@/components/app/Video/Video';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import Link from 'next/link';
|
||||
import React from 'react';
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<>
|
||||
<CloseTabNotice />
|
||||
<main className="flex-1">
|
||||
<section className="w-full py-12 md:py-24 lg:py-32 xl:py-48">
|
||||
<div className="container px-4 md:px-6">
|
||||
|
||||
31
src/components/app/CloseTabNotice/CloseTabNotice.tsx
Normal file
31
src/components/app/CloseTabNotice/CloseTabNotice.tsx
Normal file
@@ -0,0 +1,31 @@
|
||||
'use client';
|
||||
|
||||
import { useSearchParams } from 'next/navigation';
|
||||
import {
|
||||
Dialog,
|
||||
DialogContent,
|
||||
DialogDescription,
|
||||
DialogHeader,
|
||||
DialogTitle,
|
||||
} from '@/components/ui/dialog';
|
||||
|
||||
export default function CloseTabNotice() {
|
||||
const searchParams = useSearchParams();
|
||||
const close = searchParams.has('close');
|
||||
if (!close) return null;
|
||||
|
||||
return (
|
||||
<Dialog open>
|
||||
<DialogContent>
|
||||
<DialogHeader>
|
||||
<DialogTitle>You are back!</DialogTitle>
|
||||
<DialogDescription>
|
||||
Now that the github integration is installed, you can close this tab and refresh the
|
||||
other tab to see the repos! (or maybe not, in case of an organization it may need
|
||||
approval)
|
||||
</DialogDescription>
|
||||
</DialogHeader>
|
||||
</DialogContent>
|
||||
</Dialog>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user