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

[wip] Items repo #39

Open
wants to merge 2 commits into
base: staging
Choose a base branch
from
Open
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
110 changes: 0 additions & 110 deletions scripts/migrate/data/categories.json

This file was deleted.

15 changes: 10 additions & 5 deletions scripts/migrate/index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
const { SiteClient } = require('datocms-client');
const { SiteClient, Loader } = require('datocms-client');

const datocmsClient = new SiteClient('0ef9d273001e4484d53bec08550899');
const client = new SiteClient('0ef9d273001e4484d53bec08550899');
const loader = new Loader(client);

datocmsClient.items.all({}, { allPages: true }).then(items => {
console.log(items.length);
});
const getData = async () => {
await loader.load();
console.log(loader);
console.log(loader.itemsRepo);
};

getData();

// Dato Models
// [ { id: '26697',
Expand Down
75 changes: 0 additions & 75 deletions scripts/migrate/posts.js

This file was deleted.

79 changes: 0 additions & 79 deletions scripts/migrate/tags.js

This file was deleted.

8 changes: 5 additions & 3 deletions src/App/pages/Home/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,15 @@
}

& .issue-details {
flex: 0 1 50%;
flex: 0 1 100%;
display: flex;
flex-direction: column;
justify-content: center;
padding: 0 var(--s-block-spacing);

@media(--g-large-viewport) {
@media(--g-medium-viewport) {
flex-basis: 30%;
padding: 0;
}
}

Expand All @@ -149,7 +151,7 @@
object-position: right;
max-width: none;
position: relative;
left: -10%;
left: -15%;
transform: scale(1.3);

@media(--g-large-viewport) {
Expand Down
13 changes: 13 additions & 0 deletions src/datocms/new-fetch.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { SiteClient, Loader } from 'datocms-client';
// import FileCache from './cache/file';

// const cache = new FileCache({ refresh: process.env.REFRESH_FILE_CACHE });
const client = new SiteClient('0ef9d273001e4484d53bec08550899');
const loader = new Loader(client);

export default async () => {
await loader.load();

console.log(loader);
console.log(loader.itemsRepo);
};
Loading