diff --git a/src/graphql/past-events.query.js b/src/graphql/past-events.query.js
new file mode 100644
index 0000000..06327f6
--- /dev/null
+++ b/src/graphql/past-events.query.js
@@ -0,0 +1,34 @@
+import { gql } from '@solid-primitives/graphql'
+
+export default {
+ gql: gql`
+ query ($organization: String!, $repository: String!) {
+ repository(owner: $organization, name: $repository) {
+ issues(
+ first: 100
+ states: CLOSED
+ orderBy: { field: CREATED_AT, direction: DESC }
+ labels: "Approved :white_check_mark:"
+ ) {
+ nodes {
+ id
+ number
+ title
+ url
+ body
+ bodyText
+ bodyHTML
+ reactions(first: 100) {
+ nodes {
+ content
+ }
+ }
+ }
+ }
+ }
+ }
+ `,
+ vars: {
+ organization: process.env.GH_ORG
+ }
+}
diff --git a/src/graphql/issues.query.js b/src/graphql/upcoming-events.query.js
similarity index 92%
rename from src/graphql/issues.query.js
rename to src/graphql/upcoming-events.query.js
index 3885edc..cd6dc1e 100644
--- a/src/graphql/issues.query.js
+++ b/src/graphql/upcoming-events.query.js
@@ -7,6 +7,7 @@ export default {
issues(
first: 100
states: OPEN
+ orderBy: { field: CREATED_AT, direction: DESC }
labels: "Approved :white_check_mark:"
) {
nodes {
diff --git a/src/routes/events/index.jsx b/src/routes/events/index.jsx
index ec59526..a958df4 100644
--- a/src/routes/events/index.jsx
+++ b/src/routes/events/index.jsx
@@ -1,6 +1,7 @@
import { Card } from '~/components/Card'
import { formatDate } from '~/lib/formatDate'
-import issuesQuery from '~/graphql/issues.query.js'
+import upcomingEventsQuery from '~/graphql/upcoming-events.query.js'
+import pastEventsQuery from '~/graphql/past-events.query.js'
import graphql from '~/lib/graphql.server.js'
import { useRouteData } from 'solid-start'
import { For, createResource } from 'solid-js'
@@ -35,26 +36,61 @@ function EventLine(props) {
)
}
+function EventReduced(props) {
+ const [issueData] = createResource(async () => {
+ const data = await bodyParser(props.event.body)
+ return data
+ })
+
+ return (
+