-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use fake data for the display in the editor
- Loading branch information
Showing
2 changed files
with
59 additions
and
2 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
public_html/wp-content/mu-plugins/blocks/source/blocks/live-schedule/data/mock.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
import { _x } from '@wordpress/i18n'; | ||
|
||
const makeTrack = ( name ) => ( { | ||
slug: name.toLowerCase(), | ||
name: name, | ||
} ); | ||
|
||
const makeSession = ( name, time ) => ( { | ||
terms: {}, | ||
link: '#', | ||
title: { rendered: name }, | ||
meta: { | ||
_wcpt_session_type: 'session', | ||
}, | ||
session_date_time: { time }, | ||
_embedded: { | ||
speakers: [ | ||
{ | ||
id: 1, | ||
title: { rendered: _x( 'Speaker Name', 'A fake speaker name', 'wordcamporg' ) }, | ||
link: '#', | ||
}, { | ||
id: 2, | ||
title: { rendered: _x( 'Speaker Name', 'A fake speaker name', 'wordcamporg' ) }, | ||
link: '#', | ||
}, | ||
], | ||
}, | ||
} ); | ||
|
||
export default [ | ||
{ | ||
track: makeTrack( _x( 'Location', 'A fake track name', 'wordcamporg' ) ), | ||
now: makeSession( _x( 'Session Title', 'A fake session name', 'wordcamporg' ), '10:00 AM' ), | ||
next: makeSession( _x( 'Session Title', 'A fake session name', 'wordcamporg' ), '11:00 AM' ), | ||
}, | ||
{ | ||
track: makeTrack( _x( 'Location', 'A fake track name', 'wordcamporg' ) ), | ||
now: makeSession( _x( 'Workshop Title', 'A fake session name', 'wordcamporg' ), '10:00 AM' ), | ||
next: makeSession( _x( 'Session Title', 'A fake session name', 'wordcamporg' ), '1:00 PM' ), | ||
}, | ||
{ | ||
track: makeTrack( _x( 'Location', 'A fake track name', 'wordcamporg' ) ), | ||
now: makeSession( _x( 'Flash Talk Title', 'A fake session name', 'wordcamporg' ), '10:15 AM' ), | ||
next: makeSession( _x( 'Flash Talk Title', 'A fake session name', 'wordcamporg' ), '10:30 AM' ), | ||
}, | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters