I figured it out. Here’s the finished code
<?php if
(get_adjacent_post(true, '', true)) {
}
else {
next_post_link('%link', '<div class="arrow-right"></div>', TRUE); }
?>
</li>
<li>
<?php if
(get_adjacent_post(true, '', true)) {
previous_post_link('%link', '<div class="arrow-left"></div>', TRUE);
}
else {
echo '<a href="../"><div class="arrow-left"></div></a>';
}
?>