Skip to content

Commit

Permalink
Demo Admin: Regenerate news (#2933)
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyomair authored Dec 16, 2024
1 parent 595dfaf commit 4141eef
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions demo/admin/src/news/generated/NewsGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import { gql, useApolloClient, useQuery } from "@apollo/client";
import {
CrudContextMenu,
dataGridDateColumn,
DataGridToolbar,
filterByFragment,
GridColDef,
Expand Down Expand Up @@ -102,15 +103,7 @@ export function NewsGrid(): React.ReactElement {

const columns: GridColDef<GQLNewsGridFragment>[] = [
{ field: "title", headerName: intl.formatMessage({ id: "news.title", defaultMessage: "Title" }), flex: 1, minWidth: 150 },
{
field: "date",
headerName: intl.formatMessage({ id: "news.date", defaultMessage: "Date" }),
type: "date",
valueGetter: ({ row }) => row.date && new Date(row.date),
valueFormatter: ({ value }) => (value ? intl.formatDate(value) : ""),
flex: 1,
minWidth: 150,
},
{ ...dataGridDateColumn, field: "date", headerName: intl.formatMessage({ id: "news.date", defaultMessage: "Date" }), flex: 1, minWidth: 150 },
{
field: "category",
headerName: intl.formatMessage({ id: "news.category", defaultMessage: "Category" }),
Expand Down

0 comments on commit 4141eef

Please sign in to comment.