Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove new banners for Apps, Replay #1282

Merged
merged 3 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@ import { InformationCircleIcon, PlusIcon, Squares2X2Icon } from '@heroicons/reac
import { Button } from '@inngest/components/Button';
import { HoverCardContent, HoverCardRoot, HoverCardTrigger } from '@inngest/components/HoverCard';
import { Link } from '@inngest/components/Link';
import { useLocalStorage } from 'react-use';

import { useEnvironment } from '@/app/(organization-active)/(dashboard)/env/[environmentSlug]/environment-context';
import { Banner } from '@/components/Banner';
import Header, { type HeaderLink } from '@/components/Header/Header';
import { pathCreator } from '@/utils/urls';
import { useBooleanSearchParam } from '@/utils/useSearchParam';
Expand All @@ -18,10 +16,6 @@ import { Apps } from './Apps';
export default function Page() {
const env = useEnvironment();
const router = useRouter();
const [isAppsBannerVisible, setIsAppsBannerVisible] = useLocalStorage(
'AppsLaunchBannerVisible',
true
);

const [isArchived] = useBooleanSearchParam('archived');

Expand Down Expand Up @@ -78,37 +72,13 @@ export default function Page() {
automatically.
</p>
<br />
<p>Deploys have been renamed to “Syncs.” Syncs are found within Apps.</p>
<br />
<Link href="https://www.inngest.com/docs/apps/cloud">Read Docs</Link>
</HoverCardContent>
</HoverCardRoot>
</div>
}
/>
<div className="relative h-full overflow-y-auto bg-slate-100">
{isAppsBannerVisible && (
<Banner
kind="info"
onDismiss={() => {
setIsAppsBannerVisible(false);
}}
className="absolute"
>
<p className="flex-1 pr-2">
Inngest deploys have been renamed to “<b>Syncs</b>”. All of your syncs can be found
within your apps.{' '}
<Link
className="inline-flex"
internalNavigation={false}
href="https://www.inngest.com/docs/apps"
>
Learn More
</Link>
</p>
</Banner>
)}

<Apps isArchived={isArchived} />
</div>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ export default function FunctionLayout({ children, params }: FunctionLayoutProps
const { isArchived = false } = fn ?? {};
const isPaused = !isArchived && !data?.workspace.workflow?.current;

const isReplayEnabled = useBooleanFlag('function-replay');

const emptyData = !data || fetching || !fn;
const navLinks: HeaderLink[] = [
{
Expand All @@ -51,19 +49,11 @@ export default function FunctionLayout({ children, params }: FunctionLayoutProps
href: `/env/${params.environmentSlug}/functions/${params.slug}/logs`,
text: 'Runs',
},
];

if (isReplayEnabled.value) {
navLinks.push({
{
href: `/env/${params.environmentSlug}/functions/${params.slug}/replay`,
text: 'Replay',
badge: (
<Badge kind="solid" className=" h-3.5 bg-indigo-500 px-[0.235rem] text-white">
New
</Badge>
),
});
}
},
];

const doesFunctionAcceptPayload =
fn?.current?.triggers.some((trigger) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,6 @@ export default function AppNavigation({ environmentSlug }: AppNavigationProps) {
text: 'Apps',
hide: [ALL_ENVIRONMENTS_SLUG],
icon: <Squares2X2Icon className="w-3.5" />,
badge: (
<Badge kind="solid" className=" h-3.5 bg-indigo-500 px-[0.235rem] text-white">
New
</Badge>
),
},
{
href: `/env/${environmentSlug}/functions`,
Expand Down