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

allow new roles to be added in directus without a rebuild #104

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 11 additions & 18 deletions pages/careers/hire/[job].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,6 @@ import { propsWithGlobalSettings } from '@src/utils/getGlobalProps'

const PAGE_PARAM_NAME = 'job' as const

export const getStaticPaths: GetStaticPaths = async () => {
if (process.env.NODE_ENV === 'development') {
return {
paths: [],
fallback: 'blocking' as const,
}
}

const { data: slugs } = await getJobListingSlugs()

return {
paths: (slugs || []).map((slug) => ({
params: { [PAGE_PARAM_NAME]: slug },
})),
fallback: false as const,
}
}

export default function Index({
markdoc,
job,
Expand Down Expand Up @@ -94,6 +76,17 @@ export type JobPageProps = {
markdoc: MarkdocPage
}

export const getStaticPaths: GetStaticPaths = async () => {
const { data: slugs } = await getJobListingSlugs()

return {
paths: (slugs || []).map((slug) => ({
params: { [PAGE_PARAM_NAME]: slug },
})),
fallback: 'blocking',
}
}

export const getStaticProps: GetStaticProps<JobPageProps> = async (context) => {
const slug = context.params?.[PAGE_PARAM_NAME]

Expand Down
15 changes: 14 additions & 1 deletion src/generated/graphqlPlural.ts
Original file line number Diff line number Diff line change
Expand Up @@ -578,6 +578,8 @@ export type ConsoleInstance = {
status: ConsoleInstanceStatus;
/** the subdomain this instance lives under */
subdomain: Scalars['String']['output'];
/** whether this is a shared or dedicated console */
type: ConsoleInstanceType;
updatedAt?: Maybe<Scalars['DateTime']['output']>;
/** full console url of this instance */
url: Scalars['String']['output'];
Expand All @@ -592,6 +594,8 @@ export type ConsoleInstanceAttributes = {
region: Scalars['String']['input'];
/** a heuristic size of this instance */
size: ConsoleSize;
/** the type of console instance */
type: ConsoleInstanceType;
};

export type ConsoleInstanceConnection = {
Expand All @@ -612,7 +616,14 @@ export enum ConsoleInstanceStatus {
DeploymentCreated = 'DEPLOYMENT_CREATED',
DeploymentDeleted = 'DEPLOYMENT_DELETED',
Pending = 'PENDING',
Provisioned = 'PROVISIONED'
Provisioned = 'PROVISIONED',
StackCreated = 'STACK_CREATED',
StackDeleted = 'STACK_DELETED'
}

export enum ConsoleInstanceType {
Dedicated = 'DEDICATED',
Shared = 'SHARED'
}

export type ConsoleInstanceUpdateAttributes = {
Expand Down Expand Up @@ -3391,6 +3402,7 @@ export type RootMutationTypeLinkPublisherArgs = {


export type RootMutationTypeLoginArgs = {
captcha?: InputMaybe<Scalars['String']['input']>;
deviceToken?: InputMaybe<Scalars['String']['input']>;
email: Scalars['String']['input'];
password: Scalars['String']['input'];
Expand Down Expand Up @@ -4966,6 +4978,7 @@ export type User = {
id: Scalars['ID']['output'];
impersonationPolicy?: Maybe<ImpersonationPolicy>;
insertedAt?: Maybe<Scalars['DateTime']['output']>;
intercomId?: Maybe<Scalars['String']['output']>;
invites?: Maybe<Array<Maybe<Invite>>>;
jwt?: Maybe<Scalars['String']['output']>;
loginMethod?: Maybe<LoginMethod>;
Expand Down
Loading