mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-02 06:26:16 +00:00
#591 - sites
This commit is contained in:
20
resources/js/pages/application/index.tsx
Normal file
20
resources/js/pages/application/index.tsx
Normal file
@ -0,0 +1,20 @@
|
||||
import { usePage } from '@inertiajs/react';
|
||||
import { Site } from '@/types/site';
|
||||
import React from 'react';
|
||||
import AppWithDeployment from '@/pages/application/components/app-with-deployment';
|
||||
import LoadBalancer from '@/pages/application/components/load-balancer';
|
||||
import siteHelper from '@/lib/site-helper';
|
||||
|
||||
export default function Application() {
|
||||
const page = usePage<{
|
||||
site: Site;
|
||||
}>();
|
||||
|
||||
siteHelper.storeSite(page.props.site);
|
||||
|
||||
if (page.props.site.type === 'load-balancer') {
|
||||
return <LoadBalancer />;
|
||||
}
|
||||
|
||||
return <AppWithDeployment />;
|
||||
}
|
Reference in New Issue
Block a user