Skip to content

Commit 3e440bf

Browse files
author
Ives van Hoorne
committed
Fix url change and sign in button
1 parent 6934f44 commit 3e440bf

File tree

3 files changed

+38
-20
lines changed

3 files changed

+38
-20
lines changed

src/app/components/sandbox/Preview/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,10 @@ export default class Preview extends React.PureComponent {
291291
};
292292

293293
commitUrl = (url: string) => {
294-
const { history, historyPosition, urlInAddressBar = '' } = this.state;
294+
const { history, historyPosition } = this.state;
295295

296-
if (urlInAddressBar !== url) {
296+
const currentHistory = history[historyPosition] || '';
297+
if (currentHistory !== url) {
297298
history.length = historyPosition + 1;
298299
this.setState({
299300
history: [...history, url],

src/app/pages/Sandbox/Editor/Content/Header/Action.js

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@ const styles = props =>
2121
box-sizing: inherit;
2222
border-bottom: 2px solid transparent;
2323
z-index: 1;
24-
${props.highlight ? `
24+
${props.highlight
25+
? `
2526
background-color: ${props.theme.secondary.darken(0.1)()};
2627
color: white;
2728
border-bottom: 1px solid ${props.theme.secondary.darken(0.1)()};
2829
2930
&:hover {
3031
background-color: ${props.theme.secondary.darken(0.2)()};
3132
}
32-
` : `
33+
`
34+
: `
3335
3436
&:hover {
3537
color: rgba(255,255,255, 1);
@@ -40,29 +42,28 @@ const styles = props =>
4042

4143
const Title = styled.span`
4244
padding-left: 0.5rem;
43-
${props => !props.unresponsive && `
45+
${props =>
46+
!props.unresponsive &&
47+
`
4448
@media (max-width: 1300px) {
4549
display: none;
46-
}`}
50+
}`};
4751
`;
4852

49-
const Action = styled.div`
50-
${styles}
51-
`;
53+
const Action = styled.div`${styles};`;
5254

5355
const ActionLink = styled(Link)`
5456
${styles}
5557
text-decoration: none;
5658
`;
5759

58-
const ActionA = styled.a`
59-
${styles}
60-
text-decoration: none;
61-
`;
60+
const ActionA = styled.a`${styles} text-decoration: none;`;
6261

6362
const ActionTooltip = styled(Tooltip)`
6463
${styles}
65-
${props => props.disabledAction && `
64+
${props =>
65+
props.disabledAction &&
66+
`
6667
color: rgba(255,255,255,0.3);
6768
cursor: default;
6869
@@ -114,7 +115,9 @@ export default ({
114115
<IconContainer onClick={onClick}>
115116
<Icon />
116117
{title !== undefined &&
117-
<Title unresponsive={unresponsive}>{title}</Title>}
118+
<Title unresponsive={unresponsive}>
119+
{title}
120+
</Title>}
118121
{moreInfo && <MoreInfoIcon style={{ fontSize: '1.1rem' }} />}
119122
</IconContainer>
120123
</ActionTooltip>
@@ -126,7 +129,9 @@ export default ({
126129
<IconContainer onClick={onClick}>
127130
<Icon />
128131
{title !== undefined &&
129-
<Title unresponsive={unresponsive}>{title}</Title>}
132+
<Title unresponsive={unresponsive}>
133+
{title}
134+
</Title>}
130135
{moreInfo && <MoreInfoIcon style={{ fontSize: '1.1rem' }} />}
131136
</IconContainer>
132137
</Action>
@@ -140,7 +145,9 @@ export default ({
140145
<IconContainer>
141146
<Icon />
142147
{title !== undefined &&
143-
<Title unresponsive={unresponsive}>{title}</Title>}
148+
<Title unresponsive={unresponsive}>
149+
{title}
150+
</Title>}
144151
{moreInfo && <MoreInfoIcon style={{ fontSize: '1.1rem' }} />}
145152
</IconContainer>
146153
</Tooltip>
@@ -155,7 +162,9 @@ export default ({
155162
<IconContainer>
156163
<Icon />
157164
{title !== undefined &&
158-
<Title unresponsive={unresponsive}>{title}</Title>}
165+
<Title unresponsive={unresponsive}>
166+
{title}
167+
</Title>}
159168
{moreInfo && <MoreInfoIcon style={{ fontSize: '1.1rem' }} />}
160169
</IconContainer>
161170
</Tooltip>
@@ -168,7 +177,9 @@ export default ({
168177
<IconContainer>
169178
<Icon />
170179
{title !== undefined &&
171-
<Title unresponsive={unresponsive}>{title}</Title>}
180+
<Title unresponsive={unresponsive}>
181+
{title}
182+
</Title>}
172183
{moreInfo && <MoreInfoIcon style={{ fontSize: '1.1rem' }} />}
173184
</IconContainer>
174185
</ActionLink>

src/app/pages/Sandbox/Editor/Content/Header/index.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,13 @@ export default class Header extends React.PureComponent {
235235
tooltip="New Sandbox"
236236
Icon={PlusIcon}
237237
/>
238-
<Margin left={1}>
238+
<Margin
239+
style={{
240+
zIndex: 20,
241+
height: '100%',
242+
}}
243+
left={1}
244+
>
239245
{user.jwt
240246
? <div style={{ fontSize: '.875rem', margin: '6px 0.5rem' }}>
241247
<UserMenu small />

0 commit comments

Comments
 (0)